/*
 * @Author: wurangkun wurangkun@qq.com
 * @Date: 2023-04-04 14:02:48
 * @LastEditors: wurangkun wurangkun@qq.com
 * @LastEditTime: 2023-05-31 17:43:56
 * @FilePath: \ts-koa-starter-master\utils\tools.ts
 * @Description: 工具
 */
import { sendCode } from "enums/send";
/**
 * 返回封装
 */
export const send = (option?: { code?: sendCode; data?; msg?: string; }) => {
	if(!option) {
		option = { code: sendCode.成功, data : null, msg:"" }
	}
	const { code = sendCode.成功, data = null, msg = "" } = option;
	return {
		code,
		data,
		message: msg,
	};
};


export const setCreateTime = ()=> {
	return  new Date().getTime()
}